package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"path"
	"server/base"
)

func test2() {
	ok, err := path.Match("a/[^a-z]*.html", "a/11.html")
	fmt.Println("ok:", ok, err)
}

func test3() {
	f, err := os.OpenFile("/Users/cat/d/A.txt", os.O_CREATE|os.O_TRUNC|os.O_WRONLY, os.ModePerm)
	base.Raise(err)
	f.WriteString("dddd")
	f.Close()
}

func test4() {
	r, err := http.Get("https://shop.gampal.com/v1/order/txt?id=2766")
	base.Raise(err)
	b, _ := io.ReadAll(r.Body)
	fmt.Println(string(b))
}

func main() {
	//embed.FS{}
	//fs.DirEntry()
	//http.FileServer(http.FS())
	//template.ParseFS()
	test4()
}
